package com.zmn.mcc.persistence.interfaces.dept;

import com.zmn.mcc.common.dto.permit.DpermitLitDO;
import com.zmn.mcc.model.dto.dpermit.DpermitCountDO;
import com.zmn.mcc.model.entity.dept.McDeptDpermit;
import com.zmn.mcc.model.entity.dept.McDeptDpermitQuery;

import java.util.List;

/**
 * @author heguanghua
 * @since 2020/04/14 10:48
 */
public interface DeptDpermitDao {

    McDeptDpermit findByKey(McDeptDpermit deptDpermit);

    McDeptDpermit findByQuery(McDeptDpermitQuery query);

    List<McDeptDpermit> listPageByQuery(McDeptDpermitQuery query);

    List<McDeptDpermit> listByQuery(McDeptDpermitQuery query);

    List<Integer> listDataIdByQuery(McDeptDpermitQuery query);

    List<DpermitLitDO> listDpermitLitByQuery(McDeptDpermitQuery query);

    Integer countByQuery(McDeptDpermitQuery query);

    List<DpermitCountDO> countByQueryGroupByParentId(McDeptDpermitQuery query);


    Integer updateByKey(McDeptDpermit deptDpermit);

    Integer updateSubAllByQuery(McDeptDpermitQuery query);


    Integer insert(McDeptDpermit deptDpermit);

    Integer insertByBatch(List<McDeptDpermit> deptDpermits);


    Integer deleteByKey(McDeptDpermit deptDpermit);

    Integer deleteByQuery(McDeptDpermitQuery query);
}
